<template>
	<view>
		<view class="shezhi_x m-q3">
			<!-- <view class="shezhi_xm">
				<text class="m-l2">原手机号：</text>
				<input class="xgmz m-r2" type="number" value="">
			</view> -->
			<view class="shezhi_xm">
				<text class="m-l2">新手机号：</text>
				<input class="xgmz m-r2" type="number" v-model="phone">
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				phone:''
			}
			
		},
		methods:{
			tz(){
				console.log(555)
				let that = this
				let params = {
				  "phone":that.phone,
				}
				that.pyReq(that.$http.editPhone,params,function(res){
					uni.switchTab({
						url:"./index"
					})
				});
				// let headers={
				// 	  'content-type': 'application/x-www-form-urlencoded',
				// 	  'token': uni.getStorageSync('token')
				// }
				//  uni.request({
				// 	  url: that.$http.editPhone,
				// 	  method: 'POST',
				// 	  data:params,
				// 	  header:headers,
				// 	  success: (res)=>{
				// 		  console.log(res)
				// 		  uni.showToast({
				// 			icon:'none',
				// 			title:res.data.msg,
				// 			success: (res) =>{
				// 				uni.switchTab({
				// 					url:"./index"
				// 				})
				// 			}
				// 		})
				// 	  },
				// 	  fail: (err)=>{
				// 		  console.log(err)
				// 	  }
				// })  
			}
		},
		onNavigationBarButtonTap(e) {
			this.tz()
		}
	}
</script>

<style>
	.xiugi{
		border: 1upx solid #B31610;
		border-radius: 15upx;
		padding: 0 10upx;
	}
	.shezhi_xm{
		display: flex;
		justify-content: space-between;
		padding: 40upx 0;
		border-bottom: 1upx solid #B31610;
	}
	.xgmz{
		text-align: right;
		font-size: 26upx;
	}
</style>
